package io.hugetower.modules.mq;

import io.hugetower.config.RabbitConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
//@RabbitListener(queues = RabbitConfig.QUEUE_A)
public class MsgReceiver {

    @Value("${server.port}")
    Long port;
    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @RabbitHandler
    public void process(String content) throws InterruptedException {

        logger.info("接收处理队列A当中的消息：" + content);

    }

}
